<% previous_item = breadcrumb_items[-2] if breadcrumb_items.size > 1 %>
<div class="menu-bar__breadcrumb-mobile__dropdown-trigger">
  <span class="inline-block w-full overflow-hidden text-ellipsis align-middle">
      <span class="cursor-pointer truncate flex items-center gap-x-2">
        <span aria-hidden="true"><%= icon "arrow-left-s-line" %></span>
        <% if previous_item %>
          <% item_label = decidim_escape_translated(previous_item[:label]) %>
          <% if previous_item[:url].present? && !is_active_link?(previous_item[:url], :exclusive) %>
            <%= link_to(item_label, previous_item[:url], class: "menu-bar__breadcrumb-item") %>
          <% else %>
            <span class="menu-bar__breadcrumb-item"><%= item_label %></span>
          <% end %>
        <% else %>
          <%= link_to decidim.root_url, class: "menu-bar__breadcrumb-item" do %>
            <span class=""><%= t("decidim.menu.home") %></span>
          <% end %>
        <% end %>
      </span>
  </span>
  <% if content_for?(:participatory_space_mobile_actions) %>
    <div class="menu-bar__actions-mobile">
      <%= content_for :participatory_space_mobile_actions %>
    </div>
  <% end %>
</div>
